
.d2 {
    width: 400px;
    height: 200px;
    background-color: yellow;
    position: absolute; /* 绝对定位*/
    top: 20px; /*跟上面【父容器】 保持20px 间距*/
    left: 50px;

    transition: color 0.5s linear; /* vendorless fallback */
    -o-transition: color 0.5s linear; /* opera */

    -ms-transition: color 0.5s linear; /* IE 10 */

    -moz-transition: color 0.5s linear; /* Firefox */

    -webkit-transition: color 0.5s linear; /*safari and chrome */

}

.d2:hover {
    background-color: black;
    cursor: pointer;

}